<template>
  <div class="global-footer">
    <div class="footer-content">
      <div class="copyright">
        <p>© {{ currentYear }} AI Market. All rights reserved.</p>
        <p class="sub-text">
          Powered by Vue 3 + Ant Design Vue | 
          <a href="#" class="footer-link">隐私政策</a> | 
          <a href="#" class="footer-link">服务条款</a> | 
          <a href="#" class="footer-link">联系我们</a>
        </p>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { computed } from 'vue'

// 获取当前年份
const currentYear = computed(() => new Date().getFullYear())
</script>

<style scoped>
.global-footer {
  width: 100%;
  background: #fff;
  border-top: 1px solid #e8e8e8;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.copyright {
  text-align: center;
  color: #666;
}

.copyright p {
  margin: 0;
  line-height: 1.5;
}

.copyright p:first-child {
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.sub-text {
  font-size: 12px;
  color: #999;
}

.footer-link {
  color: #1890ff;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-link:hover {
  color: #40a9ff;
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .footer-content {
    padding: 0 16px;
  }
  
  .sub-text {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .footer-content {
    padding: 0 12px;
  }
  
  .copyright p:first-child {
    font-size: 14px;
  }
  
  .sub-text {
    font-size: 10px;
    line-height: 1.4;
  }
  
  /* 在小屏幕上将链接分行显示 */
  .footer-link {
    display: inline-block;
    margin: 0 4px;
  }
}
</style>